<%@ page import="com.scalar.chiptrack.utils.ConfigManager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/purchaseOrders.do"/>

<%  int i =0;
    String chipTracContext = "/" + ConfigManager.getChipTracContext(); %>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>

<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<script language="javascript" >

var receiptExists = false;
<%
	String receiptExists = (String)request.getAttribute( "showReceipt" );
	if( receiptExists != null )
	{
%>
	receiptExists = '<%=receiptExists%>';
<%
	}
%>
var dateElement = "";
function openCalendar(dateValue)
{
    dateElement = dateValue;
    newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
    newWindow.moveTo(550,180);
    newWindow.focus();
}

function assignDate(passedValue)
{
    dateElement.value=passedValue;
    window.focus();
}

function openAuditTrail( purchaseOrder_Id, poNumber )
{
    newWindow=window.open('<%=chipTracContext%>/openPurchaseOrder.do?action=auditTrail&purchaseOrder_id='+purchaseOrder_Id+'&poNumber='+poNumber,'auditTrailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=600,height=700,left=100,top=50,resizable=yes');
    newWindow.moveTo(100,50);
    newWindow.focus();
}

function editPurchaseOrder()
{
    var lineItemCount = !document.purchaseOrderForm.lineItem.length ? 0 : document.purchaseOrderForm.lineItem.length-1;
    for ( var i = 0; i <= lineItemCount; i++ )
    {
        document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].financeHold'].disabled = false;
        document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].operationsHold'].disabled = false;
        document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].cancel'].disabled = false;
    }

    document.purchaseOrderForm.poTaxType.disabled = false;
	document.purchaseOrderForm.action = '<%=chipTracContext%>/purchaseOrders.do?action=edit';
	document.purchaseOrderForm.submit();
}

function confrimPurchaseOrder()
{

   var lineItemObj = document.purchaseOrderForm.lineItem;
    if( typeof lineItemObj.length == 'undefined' )
    {
        document.purchaseOrderForm['purchaseOrderLineItemList[0].financeHold'].disabled = false;
        document.purchaseOrderForm['purchaseOrderLineItemList[0].operationsHold'].disabled = false;
        document.purchaseOrderForm['purchaseOrderLineItemList[0].cancel'].disabled = false;
        //document.purchaseOrderForm['purchaseOrderLineItemList[0].status'].disabled = false;
    }
    else
    {
        for ( var i = 0; i < lineItemObj.length; i++ )
        {
            document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].financeHold'].disabled = false;
            document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].operationsHold'].disabled = false;
            document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].cancel'].disabled = false;
            //document.purchaseOrderForm['purchaseOrderLineItemList[' + i + '].status'].disabled = false;
        }
    }

	if( receiptExists == 'true' )
	{
		document.purchaseOrderForm.action='<%=chipTracContext%>/purchaseOrderReceipt.do?action=confirm&source=po';
	}
	else
	{
		document.purchaseOrderForm.action='<%=chipTracContext%>/purchaseOrders.do?action=save';
	}
	document.purchaseOrderForm.submit();
}
function showStaPoForViewPrint( purchaseOrderId, vendorId)
{
    var poViewURL = '<%=chipTracContext%>/purchaseOrders.do?action=printerFriendly&purchaseOrderId='+ purchaseOrderId+'&vendorId='+ vendorId;
    newWindow = window.open (poViewURL,'optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,resizable=yes');
    newWindow.focus();
}
</script>

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
    <TR>
        <td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
            <!-- Side Navigation start -->
            <%@include file="/jsp/finance/purchase_order_menu.jsp" %>
            <!-- end of the side navigations -->

        <TD bgcolor="#ffffff">
            <IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
        <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
        <TD valign="top" width="100%">
            <IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
            <BR>
<!-- from here your body starts -->
<html:form name="purchaseOrderForm"  type="com.scalar.chiptrack.finance.openpo.forms.PurchaseOrderForm" action="/purchaseOrders">
		<bean:define id="searchType" name="searchType" scope="request"/>

        <table border="0"  align = "left" width ="100%" >
         <TR>
                <TD WIDTH="100%">
                    <TABLE BORDER="0" WIDTH="70%" height="175%">
            			<TR>
                           <TD WIDTH="100%" align = "right">
                                <%
                                    if( !("searchViewPurchaseOrder".equals( searchType)) && !("searchCancelledPurchaseOrder".equals( searchType )) )
                                    {
                                %>
                                    <A href="javascript:confrimPurchaseOrder()" ><img border="0" src="<%=chipTracContext%>/jsp/includes/images/confirm.gif" onmouseover="window.status='Click to Create PO';return true" onmouseout="window.status='';return true" title="Click here to Create PO"></A>&nbsp;&nbsp;&nbsp;
                                    <A href="javascript:editPurchaseOrder();" onMouseOver="window.status='Click to Reset the PO Information';return true" onMouseOut="window.status='';return true" title="Click here to Reset PO Information"><IMG border=0 src="<%=chipTracContext%>/jsp/includes/images/edit.gif"></a>
                                <%
                                    }
                                %>
                            </TD>
                        </TR>
                        <TR>
                            <TD WIDTH="100%" align = "center">
                            <FONT id="poErrors" styleClass="NArialL"><b>
                            <%
                                if( "searchViewPurchaseOrder".equals(searchType ) )
                                {
                            %>
                                    View Purchase Order Details
                            <%
                                }
                                else if( "searchCancelledPurchaseOrder".equals(searchType ) )
                                {
                            %>
                                    Cancelled Purchase Order Details
                            <%
                                }
                              else
                                {
                            %>
                                    Confirm Purchase Order Entry
                            <%
                                }
                            %>
                            </b></FONT>
                            </TD>
                        </TR>
                    </TABLE>
                    <BR>
                    <TABLE BORDER="0"  WIDTH="70%">
                        <html:hidden name="purchaseOrderForm" property="purchaseOrder_Id"/>
                        <html:hidden name="purchaseOrderForm" property="vendor_id"/>
                        <html:hidden name="purchaseOrderForm" property="billingAddress_id"/>
                        <html:hidden name="purchaseOrderForm" property="shippingAddress_id"/>
                        <TR>
                            <TD colspan = "5"><FONT id="poErrors" class="NArialL" color="red"></FONT></TD>
                        </tr>
                        <logic:equal name="searchType" value="searchViewPurchaseOrder">
                        <tr>
                            <td colspan='15' align="right"><font CLASS="NArialL">Click here to <a href='javascript:showStaPoForViewPrint(<bean:write name="purchaseOrderForm" property="purchaseOrder_Id"/>, <bean:write name="purchaseOrderForm" property="vendor_id"/>);' onmouseover="window.status='Click here to View/print purchase order';return true" onmouseout="window.status='';return true"> view/print </a>Purchase Order Details</font>
                            </td>
                        </tr>
                        </logic:equal>
                        <tr>
                        <td colspan='5'>&nbsp;</td>
                        </tr>
                        <TR>
                            <TD WIDTH="2%">&nbsp;</TD>
                            <TD WIDTH="24%" CLASS="NArialL">PO Number:</TD>
                            <TD WIDTH="24%" align = "left">
                            <font class='bodytext'><bean:write name="purchaseOrderForm" property="purchaseOrderNumber"/></font>
                            </TD>
                            <TD WIDTH="2%">&nbsp;</TD>
                            <TD WIDTH="24%" CLASS="NArialL">Type:&nbsp;</TD>
                            <TD WIDTH="24%"><font class='bodytext'><bean:write name="purchaseOrderForm" property="poTypeLabel"/></font>
                                 <html:hidden name="purchaseOrderForm" property="poType"/>
                            </TD>
                        </TR>
                        <TR>
                            <TD>&nbsp;</TD>
                            <TD CLASS="NArialL">Vendor Name:&nbsp;</TD>
                            <TD>
                                 <font class='bodytext'><bean:write name="purchaseOrderForm" property="vendorName"/></font>
                            </TD>
                            <TD>&nbsp;</TD>
                            <TD CLASS="NArialL">PO Date:&nbsp;</TD>
                            <TD>
                                 <font class='bodytext'><bean:write name="purchaseOrderForm" property="purchaseOrderDate"/></font>
                            </TD>
                        </TR>
                        <TR>
                            <TD >&nbsp;</TD>
                            <TD  CLASS="NArialL">Vendor Quote No:&nbsp;</TD>
                            <TD >
                                <font class='bodytext'><bean:write name="purchaseOrderForm" property="vendorQuoteNumber"/></font>
                            </TD>
                            <TD >&nbsp;</TD>
                            <td><font class='NArialL'>Valid To :</font></td>
					        <td><font class='bodytext'><bean:write name='purchaseOrderForm' property="validToDate"/></font>

					         </td>
                        </TR>
                        <tr>
                             <TD >&nbsp;</TD>
                            <td>
                                <font class='NArialL'><bean:message key="label.sales.salesOrder.ShippingMethod" /> :</font>
                            </td>
                            <td>
                                <nested:equal value="-2" property="shippingMethodId">
                                    <font class='bodytext'><nested:write property="newShippingMethod"/>&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;<nested:write property="newShippingAccount"/></font>
                                </nested:equal>
                                <nested:notEqual value="-2" property="shippingMethodId">
                                    <font class='bodytext'><nested:write property="shipMethod"/>
                                </nested:notEqual>
                            </td>
                            <TD >&nbsp;</TD>
                            <td>
                                <font class='NArialL'>Pay Terms :</font>
                            </td>
                            <td>
                                <nested:equal value="-2" property="payTerms">
                                    <font class='bodytext'><nested:write property="newPayTerms"/></font>
                                </nested:equal>
                                <nested:notEqual value="-2" property="payTerms">
                                    <font class='bodytext'><nested:write property="payTerms"/>
                                </nested:notEqual>
                            </td>
                             <td>&nbsp;</TD>
                        </tr>
                        <TR>
                                <TD>&nbsp;</TD>
                                <TD nowrap CLASS="NArialL">Bill To Address :&nbsp;</TD>
                                <TD><font class='bodytext'><bean:write name="purchaseOrderForm" property="billingAddressAsString"/></font></TD>
                                <TD>&nbsp;</TD>
                                <TD  nowrap CLASS="NArialL">Ship To Address :&nbsp;</TD>
                                <TD><font class='bodytext'><bean:write name="purchaseOrderForm" property="shippingAddressAsString"/></font></TD>
                            </TR>
                            <TR>
                                <TD>&nbsp;</TD>
                                <TD CLASS="NArialL">
                                <logic:notEqual name="purchaseOrderForm" property="openPurchaseOrderNumber" value="">
                                    Open PO Number:&nbsp;
                                </logic:notEqual>
                                </TD>
                                <TD>
                                 <font class='bodytext'><bean:write name="purchaseOrderForm" property="openPurchaseOrderNumber"/></font>
                                </TD>
                                <TD>&nbsp;</TD>
                                <TD nowrap></TD>
                                <TD></TD>
                            </TR>
                            <TR>
                                 <TD WIDTH="1%">&nbsp;</TD>
                                    <TD WIDTH="15%" nowrap class="NArialL">
                                    Comments:
                                    </TD>
                                    <TD><font class='bodytext'><bean:write name="purchaseOrderForm" property="comments"/></font>&nbsp;</TD>
                                    <TD> &nbsp;</TD>
                                    <TD>&nbsp;</TD>
                                    <TD></TD>
                            </TR>
                            <tr>
                            <td colspan='5'>&nbsp;</td>
                            </tr>
                            <TR>
                                <TD>&nbsp;</TD>
                                <TD nowrap>
								<logic:notEqual name="purchaseOrderForm" property="purchaseOrder_Id" value="-1">
								<font class="NArialL">Please Click here for <a class="leftsection" href="javascript:openAuditTrail(<bean:write name="purchaseOrderForm" property="purchaseOrder_Id"/>, '<bean:write name="purchaseOrderForm" property="purchaseOrderNumber"/>')" onmouseover="window.status='Click for Audit Trails';return true" onmouseout="window.status='';return true">
                                    Audit Trails</a>&nbsp;</font>
								</logic:notEqual>
								</TD>
                                <TD></TD>
                                <TD>&nbsp;</TD>
                                <TD nowrap></TD>
                                <TD></TD>
                            </TR>
                        <TR>
                            <TD WIDTH="100%" colspan="9">&nbsp;</TD>
                        </TR>
                    </TABLE>
                    <TABLE BORDER="0" WIDTH="100%" CLASS="NArialL">
                        <TR>
                            <TD WIDTH = "100%" COLSPAN="11">
                                <FONT id="lineItemErrors" class="NArialL" color="red"></FONT>
                            </TD>
                        </TR>
                        <TR>
                            <TD WIDTH="4%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER">&nbsp;<FONT COLOR="white">Line Item</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Process Name</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="26" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Part Number</FONT>
                            </TD>
							<TD WIDTH="10%" HEIGHT="26" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Vendor Part Number</FONT>
                            </TD>
                            <TD WIDTH="16%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Description</FONT>
                            </TD>

                            <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Package Type</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Requested Date</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="16" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Promised Date</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="16" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Requested Quantity</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="16" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Previous Received Quantity</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="16" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Received Quantity</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="16" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Unit Cost($)</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Extended Cost($)</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Status</FONT>
                            </TD>
                            <TD WIDTH="10%" HEIGHT="26" ALIGN="CENTER" BGCOLOR="#993333">
                                <P ALIGN="CENTER"><FONT COLOR="white">Cancel</FONT>
                            </TD>
                            <TD width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">
                                <table width="100%" border=0>
                                    <tr><td colspan=3 class="NArialL" align=center><font color="#FFFFFF">Holds</font></td></tr>
                                    <font size="-3">
                                    <TR>
                                        <td  width="40%" align=center class="NArialL"><font color="#FFFFFF">Fin</font></td>
                                        <td  width="20%">&nbsp;</td>
                                        <td  width="40%" align=center class="NArialL"><font color="#FFFFFF">Ops</font></td>
                                     </TR>
                                      </font>
                                </table></font></font>
                             </TD>
                        </TR>
                    <nested:iterate property="purchaseOrderLineItemList" type="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLineItem" indexId="lineItemIndex">
                        <TR><input type="hidden" name="lineItem">
                            <TD WIDTH="4%" ALIGN="CENTER" BGCOLOR="#DEE1E2"><nested:hidden property="purchaseOrderLineItem_Id"/>
                                <P ALIGN="CENTER"><nested:write property="purchaseOrderLineItemNumber"/>&nbsp;
                            </TD>
                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                <bean:write name="purchaseOrderLineItemList" property="processName"/>
                            </TD>
                            <TD WIDTH="10%" BGCOLOR="#DEE1E2" ALIGN="CENTER">
                                <nested:write name="purchaseOrderLineItemList" property="partNumber"/>
                            </TD>
							<TD WIDTH="10%" BGCOLOR="#DEE1E2" ALIGN="CENTER">
                                <nested:write name="purchaseOrderLineItemList" property="customerPartNumber"/>
                            </TD>
                            <TD WIDTH="16%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                   <nested:write name="purchaseOrderLineItemList" property="description"/>
                                </CENTER>
                            </TD>
                            <TD WIDTH="16%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                 <bean:write name="purchaseOrderLineItemList" property="packageType"/>
                                </CENTER>
                            </TD>

                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2" nowrap>
                                <CENTER>
                                <P>
                                <nested:write name="purchaseOrderLineItemList" property="requestedDate"/>
                                </CENTER>
                            </TD>

                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2" nowrap>
                                <CENTER>
                                <P>
                                <nested:write name="purchaseOrderLineItemList" property="promisedDate"/>
                                </CENTER>
                            </TD>

                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                 <nested:write name="purchaseOrderLineItemList" property="requestedQuantity"/>
                                </CENTER>
                            </TD>
                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                <nested:write name="purchaseOrderLineItemList" property="previouslyShipppedQty"/>
                                </CENTER>
                            </TD>

                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                <nested:write name="purchaseOrderLineItemList" property="shippedQty"/>
                                </CENTER>
                            </TD>

                            <TD WIDTH="10%" ALIGN="right" BGCOLOR="#DEE1E2">
                                <P><nested:write name="purchaseOrderLineItemList" property="unitCost"/>
                            </TD>

                            <TD WIDTH="10%" ALIGN="right" BGCOLOR="#DEE1E2">
                                <P><nested:write name="purchaseOrderLineItemList" property="extendedCostAsString"/>
                            </TD>

                            <TD WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER><P>
                                <nested:write name="purchaseOrderLineItemList" property="status" />
                                </CENTER>
                            </TD>
                            <TD  WIDTH="10%" ALIGN="CENTER" BGCOLOR="#DEE1E2">
                                <CENTER>
                                <P>
                                <nested:checkbox property="cancel" styleClass="txfield" disabled="true" />
                                </CENTER>
                            </TD>
                            <TD ALIGN="left" BGCOLOR="#DEE1E2" nowrap>
                            <nested:select property="financeHold" styleClass="txfield" disabled="true">
                                <option value="-1">X</option>
                                <option value="0"> </option>
                                <html:options collection="financeReasonCodes" property="value" labelProperty="label" />
                            </nested:select>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <nested:select property="operationsHold" styleClass="txfield" disabled="true">
                                <option value="-1">X</option>
                                <option value="0"> </option>
                                <html:options collection="opsReasonCodes" property="value" labelProperty="label" />
                            </nested:select>
                            </TD>
                        </TR>
                     <% i++;%>
                        </nested:iterate>
                        <TR>
                            <TD width="20%" colspan="8">&nbsp;</TD>
                            <TD WIDTH="20%">&nbsp;</TD>
                            <TD WIDTH="12%">&nbsp;</TD>
                            <TD WIDTH="26%">&nbsp;</TD>
                            <TD WIDTH="8%">&nbsp;</TD>
                        </TR>
                        <logic:notEqual name="searchType" value="searchCancelledPurchaseOrder">
                            <TR>
                                    <TD WIDTH="20%" colspan="10">&nbsp;</TD>
                                    <TD WIDTH="26%" ALIGN="RIGHT">Sub Total:&nbsp;$</TD>
                                    <TD WIDTH="8%" align="right"><bean:write name="purchaseOrderForm" property="subTotalAsString"/></TD>
                                    <TD WIDTH="14%">&nbsp;</TD>
                                    <TD WIDTH="14%">&nbsp;</TD>
                            </TR>
                            <TR>
                                <TD width="20%" colspan="3"> &nbsp; </TD>
                                <TD width="20%" > PO Tax State </TD>
                                <TD width="20%" colspan="6">
                                <html:select name="purchaseOrderForm" property="poTaxType" styleClass="txfield"  disabled="true" >
                                    <html:option value="0" >Non Taxable</html:option>
                                    <html:options collection="poTaxes" property="value" labelProperty="label" />
                                    <html:option value="-1">Others</html:option>
                                </html:select>
                                </TD>
                                <TD WIDTH="26%" ALIGN="RIGHT">Freight:&nbsp;$</TD>
                                <TD WIDTH="8%" align="right"><bean:write name="purchaseOrderForm" property="freight"/></TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                            </TR>
                            <TR>
                                <TD width="20%" colspan="10"></TD>
                                <TD WIDTH="26%" ALIGN="RIGHT" nowrap>Trade Discount&nbsp;$</TD>
                                <TD WIDTH="8%" align="right"><bean:write name="purchaseOrderForm" property="tradeDiscount"/></TD></TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                            </TR>
                            <TR>
                                <TD WIDTH="40%" COLSPAN="10"  rowspan="2"></TD>
                                <TD WIDTH="26%" ALIGN="RIGHT">Miscellaneous:&nbsp;$</TD>
                                <TD WIDTH="8%" align="right"><bean:write name="purchaseOrderForm" property="miscellaneous"/></TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                            </TR>
                            <TR>
                                <TD WIDTH="26%" ALIGN="RIGHT">Tax:&nbsp;$</TD>
                                <TD WIDTH="8%" align="right"><bean:write name="purchaseOrderForm" property="tax"/></TD>
                                <TD WIDTH="14%">&nbsp;
                                <TD WIDTH="14%">&nbsp;</TD>
                            </TR>
                            <TR>
                                <TD width="20%" colspan="10">&nbsp;</TD>
                                <TD WIDTH="26%" ALIGN="RIGHT">Order Total:&nbsp;$</TD>
                                <TD WIDTH="8%" align="right"><bean:write name="purchaseOrderForm" property="totalAsString"/></TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                                <TD WIDTH="14%">&nbsp;</TD>
                            </TR>
                        </logic:notEqual>
                        <TR>
                            <TD width="20%" colspan="10">&nbsp;</TD>
                            <TD WIDTH="20%">&nbsp;</TD>
                            <TD WIDTH="12%">&nbsp;</TD>
                            <TD WIDTH="26%">&nbsp;</TD>
                            <TD WIDTH="8%">&nbsp;</TD>
                    </TR>
                    <TR>
                        <TD colspan="11" align="center">
                                &nbsp;
                        </TD>
                        <TD colspan="4">&nbsp;</TD>
                    </TR>
                    </TABLE>
                    <BR>
                </TD>
           </TR>
          </TABLE>
<input type="hidden" name="searchType" value="<%=request.getAttribute("searchType")%>">
</html:form>
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</BODY>
</HTML>